# include <bits/stdc++.h>
using namespace std;
int n, k;
long tol;
void make(int sum, int t, int d) { 
    if(d == k) tol++;
    else { 
        for(int i = t; i <= sum >> 1; i++) { 
            make(sum - i, i, d + 1);
        }
    }
}
int main() { 
    cin >> n >> k;
    tol = 0;
    make(n, 1, 1);
    printf("%ld\n", tol);
}
